package com.example.bgxqwebsocket.controller;

import com.example.bgxqapi.domain.ApiResult;
import com.example.bgxqwebsocket.service.WebSocket;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

@RequestMapping("/bgxq/monitor")
@RestController
@Validated
@Slf4j
@ApiIgnore
public class MonitorController {

  @GetMapping("/onlineSum")
  public ApiResult<Integer> onlineSum(){
    return ApiResult.success(WebSocket.getOnlineSum());
  }


}
